// api.js
import {
	request
} from '@/utils/request.js'; // 引入封装好的request.js
//获取推广二维码
export const getQrCode = (data) => {
	return request({
		url: '/promotional_poster/generate_qrCode/h5',
		method: 'GET',
		data: data,
	});
};
//获取推广背景
export const getQrCodeBag = (data) => {
	return request({
		url: '/promotional_poster/getPage',
		method: 'POST',
		data: data,
	});
};
//根据id获取文章
export const getArticle = (id) => {
	return request({
		url: `/home_article/getById/${id}`, // 使用模板字符串并正确插入 id
		method: 'GET',
	});
};
export const getArticleList = (data) => {
	return request({
		url: `/home_article/getPage`, // 使用模板字符串并正确插入 id
		method: 'POST',
		data: data,
	});
};
